package com.hw.weathershow.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.RequiredArgsConstructor;

import java.util.Date;

/**
 * The type Weather.
 *
 * @author Cejay1314
 * @version 1.0
 * @create 2022 /12/4 11:58
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
//@RequiredArgsConstructor
public class Weather {
    /**
     * The Id.
     */
    @TableId(type = IdType.AUTO)
    Long id;
    /**
     * The City.
     */
    String city;
    /**
     * The Province.
     */
    String province;
    /**
     * The Weather.
     */
    String weather;
    /**
     * The Temperature.
     */
    String temperature;
    /**
     * The Wind direction.
     */
    String windDirection;
    /**
     * The Wind power.
     */
    String windPower;
    /**
     * The Humidity.
     */
    String humidity;
    @Version
    private Integer version;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


    /**
     * Instantiates a new Weather.
     *
     * @param city          the city
     * @param province      the province
     * @param weather       the weather
     * @param temperature   the temperature
     * @param windDirection the wind direction
     * @param windPower     the wind power
     * @param humidity      the humidity
     */
    public Weather(String city, String province, String weather, String temperature, String windDirection, String windPower, String humidity) {
        this.city = city;
        this.province = province;
        this.weather = weather;
        this.temperature = temperature;
        this.windDirection = windDirection;
        this.windPower = windPower;
        this.humidity = humidity;
    }
}
